package cn.com.bdqn.dao;

import cn.com.bdqn.entity.SyCostType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SyCostTypeDao {

    @Select("select * from sy_costtype where Kind = #{value}")
    public List<SyCostType> queryByKind(Long kind);

    @Select("select * from sy_costtype where id = #{value}")
    public SyCostType queryById(Long id);

    public int updateSyCostType(SyCostType syCostType);

    @Insert("insert into sy_costtype values\n" +
            "(default,#{kind},#{code},#{costTypeName},#{fullName},#{price},#{surchargeText},#{remark},0)")
    public int addSyCostType(SyCostType syCostType);
}
